<%--
  Created by IntelliJ IDEA.
  User: Moataz
  Date: Apr 26, 2009
  Time: 4:43:59 PM
  To change this template use File | Settings | File Templates.
--%>
<table>
  <g:render template="/common/positionTableHeader"/>
  <tbody>
  <g:findAll in="${eventInstance.positions}" expr="it.volunteers.size() < it.numberOfVolunteers">
    <tr class="prop">
      <td valign="top" class="value">${it.name}</td>
      <td valign="top" class="value">${it.description}</td>
      <td valign="top" class="value">${it.location}</td>
      <td valign="top" class="value">${it.startDate}</td>
      <td valign="top" class="value">${it.endDate}</td>
      <td valign="top" class="value">${it.numberOfVolunteers}</td>
      <td valign="top" class="value">
        <ul>
          <g:each var="v" in="${it.volunteers}">
            <li><g:link controller="volunteer" action="show" id="${v.id}">${v?.encodeAsHTML()}</g:link></li>
          </g:each>
        </ul>
      </td>
      <td valign="top">
        <g:remoteLink update="confirmationMessage" controller="eventPosition" action="signupAJAX" id="${it.id}" onComplete="refreshPositionTable();">Signup</g:remoteLink>
      </td>
    </tr>
  </g:findAll>
  </tbody>
</table>
